home *** CD-ROM | disk | FTP | other *** search
/ Light ROM 1 / LIGHT-ROM 1 (Amiga Library Services)(1994).iso / ffdisks / d892.lha / Indent / source / source.lha / makefile.in < prev    next >
Makefile  |  1993-06-17  |  5KB  |  192 lines

  1. # Makefile template for GNU indent
  2. # Copyright (C) 1992, Free Software Foundation, Inc.
  3. #
  4. # This file is part of GNU indent.
  5. #
  6. # GNU indent is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10. # GNU indent is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. # GNU General Public License for more details.
  14. # You should have received a copy of the GNU General Public License
  15. # along with GNU indent; see the file COPYING.  If not, write to
  16. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. #### Start of system configuration section. ####
  19.  
  20. srcdir = @srcdir@
  21. VPATH = @srcdir@
  22.  
  23. CC = @CC@
  24.  
  25. INSTALL = @INSTALL@
  26. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  27. INSTALL_DATA = @INSTALL_DATA@
  28.  
  29. AWK = awk
  30. MAKEINFO = makeinfo
  31.  
  32. # Used in making distributions.  GNU now uses the utility `gzip'
  33. # form compaction.
  34. TAR = tar
  35. ZIP = gzip
  36.  
  37. DVITOGHOSTSCRIPT = dvi2ps indent.dvi > indent.ps
  38. CTAGS = etags
  39.  
  40. CFLAGS = -O -g
  41. LDFLAGS = -g
  42.  
  43. # C compiler -D options.
  44. DEFS = @DEFS@
  45.  
  46. # Where to install indent and its documentation.
  47. prefix = /usr/local
  48. exec_prefix = ${prefix}
  49. bindir = $(exec_prefix)/bin
  50. infodir = ${prefix}/info
  51.  
  52. #### End of system configuration section. ####
  53.  
  54. SHELL =   /bin/sh
  55. SRC =      indent.c io.c lexi.c parse.c pr_comment.c args.c globs.c \
  56.       backup.c memcpy.c
  57. OBJ =      indent.o io.o lexi.o parse.o pr_comment.o args.o globs.o \
  58.       backup.o @LIBOBJS@
  59. HEADERS = indent.h sys.h version.h backup.h
  60. MAN =      indent.texinfo texinfo.tex
  61. NOTES =   ChangeLog OChangeLog Projects
  62. VMSFILES= VMS-README gnuc-make.com vaxc-make.com
  63.  
  64. CONFIG = configure.in configure CONF-README
  65.  
  66. MANJUNK = indent.dvi indent.cp indent.cps indent.aux indent.dlog \
  67. indent.fn indent.fns indent.ky indent.kys indent.log indent.pg   \
  68. indent.pgs indent.toc indent.tp indent.tps indent.vr indent.vrs indent.ps 
  69.  
  70. # What to put in a distribution
  71. TARFILES = ${SRC} Makefile makefile.in ${MAN} indent.info ${HEADERS} \
  72. ${NOTES} indent.gperf ${CONFIG} indent.1 ${VMSFILES}
  73. RELEASEFILES = RELEASE-NOTES README
  74.  
  75.  
  76. # Make the program and documentation
  77. #
  78. all: indent indent.info
  79.  
  80. indent: ${OBJ}
  81.     ${CC} -o indent ${LDFLAGS} ${OBJ}
  82.  
  83. .c.o:
  84.     ${CC} -c ${CFLAGS} ${CPPFLAGS} ${DEFS} $<
  85.  
  86.  
  87. backup.o: backup.c backup.h sys.h makefile
  88. globs.o: globs.c sys.h makefile
  89.  
  90. indent.o: indent.c indent.h sys.h makefile
  91. args.o: args.c version.h indent.h sys.h makefile
  92. io.o: io.c indent.h sys.h makefile
  93. lexi.o: lexi.c indent.h sys.h makefile
  94. parse.o: parse.c indent.h sys.h makefile
  95. pr_comment.o: pr_comment.c indent.h sys.h makefile
  96. memcpy.o: memcpy.c indent.h sys.h makefile
  97.  
  98.  
  99. # Build tag tables
  100. tags: ${SRC}
  101.     ${CTAGS} -t ${SRC} ${HEADERS}
  102. TAGS: tags
  103.  
  104.  
  105.  
  106. # Documents
  107. #
  108. indent.ps: indent.dvi
  109.     ${DVITOGHOSTSCRIPT}
  110.  
  111. indent.dvi: indent.toc
  112.     tex ${srcdir}/indent.texinfo
  113.  
  114. indent.toc: ${MAN}
  115.     tex ${srcdir}/indent.texinfo
  116.  
  117. indent.info: ${MAN}
  118.     ${MAKEINFO} ${srcdir}/indent.texinfo
  119.  
  120.  
  121.  
  122. # Installation of indent
  123. #
  124. install: all
  125.     ${INSTALL_PROGRAM} indent ${bindir}/indent
  126.     ${INSTALL_DATA} ${srcdir}/indent.info ${infodir}/indent.info
  127.  
  128.  
  129. # Cleaning up
  130. #
  131.  
  132. # Delete all files generated by building indent or making the manual
  133. clean: mostlyclean
  134.     rm -f ${MANJUNK}
  135.  
  136. # Delete all files created by configuring or building indent
  137. distclean: clean
  138.     rm -f makefile indent-*.tar*
  139.     rm -rf indent-*
  140.  
  141. # Clean up the .o files, leaving the man stuff
  142. mostlyclean:
  143.     rm -f ${OBJ} indent
  144.  
  145. # Clean up tar files, indent-generated backup files, and indent
  146. # subdirectories
  147. realclean: distclean
  148.     rm -f indent.info TAGS core
  149.  
  150.  
  151.  
  152. # Create a distribution file
  153. #
  154. DISTDIR = indent-${VERSION}
  155. TARFILE = indent-${VERSION}.tar
  156. DISTFILE = ${TARFILE}.gz
  157. AWKVERSION = ${AWK} '/define VERSION_STRING/ {printf "%s", \
  158.                      substr($$NF, 1, length($$NF) - 1)}' version.h
  159.  
  160.  
  161. dist: ${TARFILES}
  162.     @export VERSION ; VERSION=`${AWKVERSION}` ; \
  163.     ${MAKE} tarfile
  164. #    @unset VERSION
  165.  
  166. tar: dist
  167.  
  168. # NOTE: GNU tar has a compress option, -z, which used to be used below.
  169. # However, GNU is now using `gzip' as it's compaction utility, and this
  170. # function has not yet been integrated into GNU `tar'.
  171. #    tar -c -h -f ${TARFILE} ${DISTDIR}
  172. #    compress ${TARFILE}
  173. tarfile:
  174.     @test -f README-${VERSION} || (echo Missing file README-${VERSION}; exit 1)
  175.     @test -f RELEASE-NOTES-${VERSION} || (echo Missing file RELEASE-NOTES-${VERSION}; exit 1)
  176.     @echo Making compressed tar file, indent ${VERSION}
  177.     @echo
  178.     @rm -f README
  179.     @ln -s README-${VERSION} README
  180.     @rm -f RELEASE-NOTES
  181.     @ln -s RELEASE-NOTES-${VERSION} RELEASE-NOTES
  182.     @rm -rf ${DISTDIR}
  183.     @rm -f ${DISTFILE}
  184.     @mkdir ${DISTDIR}
  185.     @cd ${DISTDIR} ; for i in ${TARFILES} ${RELEASEFILES} ; do ln -s ../$$i . ; done
  186.     @${TAR} -c -v -h -f ${TARFILE} ${DISTDIR}
  187.     ${ZIP} --verbose --best ${TARFILE}
  188.     @rm -rf ${DISTDIR}
  189.  
  190.